package com.zr.controller;
/**
 *   @author   CY
 */
import java.io.IOException;
import java.io.PrintWriter;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.zr.service.UserService;
import com.zr.serviceImpl.UserServiceImpl;

import net.sf.json.JSONObject;

public class OvertimeAuditController extends HttpServlet {
	UserService user=new UserServiceImpl();
	@Override
	protected void doGet(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		doPost(req, resp);
	}
	@Override
	protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
		resp.setCharacterEncoding("utf-8");
		req.setCharacterEncoding("utf-8");
		int id=Integer.parseInt(req.getParameter("id"));
		JSONObject j= user.findAuditById(id);
		PrintWriter pw=resp.getWriter();
		pw.write(j.toString());
		pw.flush();
		pw.close();
		
	}
}
